/*
 * DrawingCanvas.h
 *
 *  Created on: Jul 1, 2009
 *      Author: kurt
 */

#ifndef DRAWINGCANVAS_H_
#define DRAWINGCANVAS_H_

#include "Object.h"
#include "Location.h"
#include "KeyListener.h"
#include "CanvasManager.h"
#include "Color.h"

namespace objdraw 
{

class DrawingCanvas: public objdraw::Object 
{
	protected:
		Location start;
		float width, height;
		CanvasManager cmanager;
	public:
		virtual ~DrawingCanvas();
		DrawingCanvas();
		
		virtual CanvasManager& getCanvasContent();
		
		virtual float getHeight();
		virtual float getWidth();
		virtual float getX();
		virtual float getY();
		virtual Location getLocation();
		
		virtual void move(float dx, float dy);
		virtual void moveTo(float x, float y);
		virtual void moveTo(Location point);
		
		virtual void repaint();
		virtual inline void redraw() { repaint(); }
		
		virtual void clearScreen(Color c);
		virtual void clearScreen();
		
		virtual inline void clear() { cmanager.clear(); }
		
		virtual std::string toString();
};

}

#endif /* DRAWINGCANVAS_H_ */
